package br.com.werp.regras.geral.visao.taglib;

import br.com.werp.regras.geral.util.Html;

import java.io.IOException;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpSession;


/**
 * @author Sobreira,Rafael Carneiro
 * Criado em 08/12/2005
 */
public class PortalTag extends MasterTag {
    private static final long serialVersionUID = 1039616204501575175L;
    private static final String TARGET = "_BLANK";

    public void otherDoStartTagOperations() {
        HttpSession session = pageContext.getSession();
        StringBuffer stringBuffer = new StringBuffer();
        Map map = new HashMap();
        map.put("validar_action", "");
        map.put("empresaId", session.getAttribute("empresaId"));
        map.put("filialId", session.getAttribute("filialId"));
        map.put("j_username", session.getAttribute("j_username"));
        stringBuffer.append(Html.href("../almoxarifado/index.jsp", map, TARGET));
        stringBuffer.append("  Almoxarifado</a> | ");
        stringBuffer.append(Html.href("../contabilidade/index.jsp", map, TARGET));
        stringBuffer.append("Contabilidade</a> | ");
        stringBuffer.append(Html.href("../suporte/index.jsp", map, TARGET));
        stringBuffer.append("Suporte</a> | ");
        stringBuffer.append(Html.href("../tesouraria/index.jsp", map, TARGET));
        stringBuffer.append("Tesouraria</a>");

        try {
            pageContext.getOut().write(stringBuffer.toString());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
